#include "../exportapi.h"

#include "stringconv.h"


std::wstring_convert<std::codecvt_utf8_utf16<char16_t>, char16_t> StringConv::_converter;

std::u16string StringConv::ToUtf16String(char* strAnsiOrUtf8)
{
	return StringConv::_converter.from_bytes(strAnsiOrUtf8);
}
std::string StringConv::ToUtf8String(char16_t* strUtf16)
{
	return StringConv::_converter.to_bytes(strUtf16);
}
std::u16string StringConv::ToUtf16String(std::string strAnsiOrUtf8)
{
	return StringConv::_converter.from_bytes(strAnsiOrUtf8);
}
std::string StringConv::ToUtf8String(std::u16string strUtf16)
{
	return StringConv::_converter.to_bytes(strUtf16);
}